import { request } from '@gui-pkg/request';

enum Api {
  UpdateGate = '/api/gq/st/equip/updateGate',
  DeviceGateUp = '/api/gq/st/equip/gate/controller',
  Panorama = '/api/gq/onemap/saveOrUpdatePanorama',
}

const requestOptions = {
  isTransformResponse: false,
};

// 设置闸门开合度
export const updateGate = (params) => {
  return request.post({ url: Api.UpdateGate, params });
};

// 查看闸门情况接口
export const checkGateConfig = (stcd) => {
  return request.get({ url: `/api/gq/st/equip/gate/condition?stcd=${stcd}` });
};

// 设置闸门开启、关闭、暂停
export const setDeviceGateUp = (params) => {
  return request.post({ url: Api.DeviceGateUp, params });
};

// 测站统计
export const getStbprpbTypeList = () => {
  return request.get({ url: `/api/gq/st/stbprpb/types/list?calNumFlag=true` });
};
